package com.rockcent.mall.lib.repository;

import com.rockcent.mall.lib.domain.SysUserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by oyhk on 2016/12/12.
 *
 */
@Repository
public interface SysUserRoleRepository extends JpaRepository<SysUserRole, Long>, JpaSpecificationExecutor, SysUserRoleRepositoryCustom {

    List<SysUserRole> findByUserInfoId(Long userInfoId);

    List<SysUserRole> findByUserInfoIdAndRoleId(Long userInfoId, Long roleId);
}
